
<div style="margin-top: 20px">
  <table width="1000px" height="40px" cellpadding=0 cellspacing=0>
    <tr>
      <td height="1px"><hr size="1" /></td>
    </tr>
    <tr>
      <td height="38px" align="left">
        <table width="1000px" height="38px" cellpadding=0 cellspacing=0 id="{{$t|escape:javascript}}_knowledge_menu">
        </table>
      </td>
    </tr>
    <tr>
      <td height="1px"><hr size="1" /></td>
    </tr>
  </table>
</div>


<script src="jsrequest.php?script=knowledgebasemenu" type="text/javascript"></script>
<script type="text/javascript">
  <!--
    if (document.addEventListener) {
      document.addEventListener('DOMContentLoaded', init, false);
    }
    window.onload = init;

    function init() {
      if (!document.getElementById || !document.createElement || !arguments || arguments.callee._loaded) {
        return;
      }
      arguments.callee._loaded = true;
      
      var msg = JSON.parse('{{$msg|escape:javascript}}');
      var idx = msg['idx'];
      var type = msg['type'];

      var menu_table = document.getElementById('{{$t|escape:javascript}}_knowledge_menu');
      tr = menu_table.insertRow(-1);
      td = tr.insertCell(-1);
      td.style.width = '60px';
      td.style.align = 'left';
      var a = document.createElement('a');
      a.style.color = (type == '') ? '#98385d' : '#707070';
      a.href ='?t=knowledgebases' + '&i=' + idx + '&c=1';
      a.appendChild(document.createTextNode('ALL'));
      td.appendChild(a);
      
      td = tr.insertCell(-1);
      td.style.width = '190px';
      td.style.align = 'left';
      var a = document.createElement('a');
      a.style.color = (type == '{{$smarty.const.KNOWLEDGE_TYPE_CUSTOMER_SERVICES|escape:javascript}}') ? '#98385d' : '#707070';
      a.href = '?t=knowledgebases' + '&i=' + idx + '&c=1' + '&type=' + "{{$smarty.const.KNOWLEDGE_TYPE_CUSTOMER_SERVICES|escape:javascript}}";
      a.appendChild(document.createTextNode('CUSTOMER SERVICES'));
      td.appendChild(a);
      
      td = tr.insertCell(-1);
      td.style.width = '110px';
      td.style.align = 'left';
      var a = document.createElement('a');
      a.style.color = (type == '{{$smarty.const.KNOWLEDGE_TYPE_PRODUCTS|escape:javascript}}') ? '#98385d' : '#707070';
      a.href = '?t=knowledgebases' + '&i=' + idx + '&c=1' + '&type=' + "{{$smarty.const.KNOWLEDGE_TYPE_PRODUCTS|escape:javascript}}";
      a.appendChild(document.createTextNode('PRODUCTS'));
      td.appendChild(a);
      
      td = tr.insertCell(-1);
      td.style.width = '160px';
      td.style.align = 'left';
      var a = document.createElement('a');
      a.style.color = (type == '{{$smarty.const.KNOWLEDGE_TYPE_DESIGN_SERVICES|escape:javascript}}') ? '#98385d' : '#707070';
      a.href = '?t=knowledgebases' + '&i=' + idx + '&c=1' + '&type=' + "{{$smarty.const.KNOWLEDGE_TYPE_DESIGN_SERVICES|escape:javascript}}";
      a.appendChild(document.createTextNode('DESIGN SERVICES'));
      td.appendChild(a);
      
      td = tr.insertCell(-1);
      td.style.width = '200px';
      td.style.align = 'left';
      var a = document.createElement('a');
      a.style.color = (type == '{{$smarty.const.KNOWLEDGE_TYPE_MARKETING|escape:javascript}}') ? '#98385d' : '#707070';
      a.href = '?t=knowledgebases' + '&i=' + idx + '&c=1' + '&type=' + "{{$smarty.const.KNOWLEDGE_TYPE_MARKETING|escape:javascript}}";
      a.appendChild(document.createTextNode('MARKETING AND BUSINESS'));
      td.appendChild(a);
      
      td = tr.insertCell(-1);
      td.style.align = 'left';
    }
  //-->
</script>